package com.thfw.test.view.network;


import com.thfw.test.model.authManage.AuthBaseBean;
import com.thfw.test.model.authManage.LampInterfaceBean;
import com.thfw.test.model.authManage.PriceBean;
import com.thfw.test.model.authManage.TokenBean;
import com.thfw.test.model.bean.BindingBean;
import com.thfw.test.model.bean.CameraBean;
import com.thfw.test.model.bean.CaptchaBean;
import com.thfw.test.model.bean.EnergyBean;
import com.thfw.test.model.bean.GatewayBean;
import com.thfw.test.model.bean.GroupBean;
import com.thfw.test.model.bean.LampListBean;
import com.thfw.test.model.bean.MainEnergyBean;
import com.thfw.test.model.bean.MainMsgBean;
import com.thfw.test.model.bean.PriceBeanBean;
import com.thfw.test.model.bean.RegionBean;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

/**
 * Created by zhenglikun on 2017/3/3.
 */

public interface AuthManageService {

    //获取uuid验证码
    @GET("/auth/getCaptcha")
    Call<AuthBaseBean<CaptchaBean>> getCaptcha(@QueryMap Map<String, String> params);



    //获取uuid验证码
    @GET("/dop/api/v1/bidding/normal/normal_list")
    Call<PriceBean<PriceBeanBean>> getPrice1(@QueryMap Map<String, String> params);


    //获取灯具管理组
    @GET("/auth/logout")
    Call<AuthBaseBean<Object>>  logout(@Header("Authorization") String token);


    @POST("/auth/login")
    @Headers("Content-Type:application/json;charset=utf-8")
    Call<TokenBean> getToken(@Body RequestBody body);


    //获取灯具管理组
    @GET("/region/group/select")
    Call<AuthBaseBean<ArrayList<GroupBean>>> getLightGroup(@Header("Authorization") String token,@QueryMap Map<String, String> params);


    //获取灯具管理组
    @GET("/region/group/getGroup")
    Call<AuthBaseBean<ArrayList<GroupBean>>> getLightGroupNew(@Header("Authorization") String token,@QueryMap Map<String, String> params);


    //打开关闭灯，可传组id，或区域id
    @POST("/lamp/lamp/lightOpenAll")
    @Headers("Content-Type:application/json;charset=utf-8")
    Call<AuthBaseBean<Object>> lightOpenAll(@Header("Authorization") String token,@Body RequestBody body);


    //调节灯光亮度，可传组id，或区域id
    @POST("/lamp/lamp/brightnessAll")
    @Headers("Content-Type:application/json;charset=utf-8")
    Call<AuthBaseBean<Object>> brightnessAll(@Header("Authorization") String token,@Body RequestBody body);


    //调解任意组灯光亮度
    @POST("/lamp/lamp/brightness")
    @Headers("Content-Type:application/json;charset=utf-8")
    Call<AuthBaseBean<Object>> brightnessConbinationGroup(@Header("Authorization") String token,@Body RequestBody body);

    //调解任意组灯光亮度
    @POST("/lamp/lamp/openOrClose")
    @Headers("Content-Type:application/json;charset=utf-8")
    Call<AuthBaseBean<Object>> openOrClose(@Header("Authorization") String token,@Body RequestBody body);

    //首页信息展示
    @GET("/index/statistics")
    Call<AuthBaseBean<MainMsgBean>> getMainMsg(@Header("Authorization") String token);




    //系统能耗显示
    @POST("/index/energyStatistics")
    @Headers("Content-Type:application/json;charset=utf-8")
    Call<AuthBaseBean<MainEnergyBean>> getEnergyStatistics(@Header("Authorization") String token, @Body RequestBody body);

    //能耗统计接口
    @GET("/hour/hour/statistics")
    Call<AuthBaseBean<EnergyBean>> getEnergyData(@Header("Authorization") String token, @QueryMap Map<String, String> params);

    //策略查询接口
    @GET("/strategy/binding/getInfoMsg")
    Call<AuthBaseBean<EnergyBean>> getAdd4TimeAndMan(@Header("Authorization") String token, @QueryMap Map<String, String> params);


    //区域选择接口
    @GET("/region/region/getTree")
    Call<AuthBaseBean<ArrayList<RegionBean>>> getRegion(@Header("Authorization") String token);


    //策略生效接口
    //打开关闭灯，可传组id，或区域id
    @POST("/strategy/binding/add4TimeAndMan")
    @Headers("Content-Type:application/json;charset=utf-8")
    Call<AuthBaseBean<BindingBean>> add4TimeAndMan(@Header("Authorization") String token, @Body RequestBody body);

    //策略修改接口
    @POST("/strategy/binding/edit")
    @Headers("Content-Type:application/json;charset=utf-8")
    Call<AuthBaseBean<BindingBean>> editAdd4TimeAndMan(@Header("Authorization") String token, @Body RequestBody body);

    //策略状态查询接口


    //灯具列表
    @GET("/lamp/lamp/app/list")
    Call<LampInterfaceBean<ArrayList<LampListBean>>> getLampList(@Header("Authorization") String token);

    //摄像头列表
    @GET("/camera/camera/app/list")
    Call<LampInterfaceBean<ArrayList<CameraBean>>> getCameraList(@Header("Authorization") String token);

    //网关列表
    @GET("/gateway/gateway/app/list")
    Call<LampInterfaceBean<ArrayList<GatewayBean>>> getGatewayList(@Header("Authorization") String token);


}
